<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登陆</title>
    <script src="js/jquery.min.js"></script>
    <script>
        function submit() {
            var username = $("#username").val();
            var password = $("#password").val();
            $.getJSON("/login",
            {
                "username":username,
                "password":password
            },
            function(result) {
                if(result.succ == 200) {
                    alert(result.msg);
                } else {
                    alert("请求错误！");
                }
            })
        }
    </script>
</head>
<body>
    <h1>登陆</h1>
    <div>username：<input id="username"></div>
    <div>password：<input id="password"></div>
    <br>
    <input type="button" value="提交" onclick="submit()">
</body>
</html>